/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package hibertest;

import org.hibernate.Session;

/**
 *
 * @author User
 */
public class TestDAO {
  public Long addTest (hibernate.Test test) {   
        Session session = HibernateUtil.getSessionFactory().openSession();
        session.beginTransaction();
        Long result = (Long)session.save(test);
        session.getTransaction().commit();
        return result;
    }
  
 
}
